<<<<<<< .mine
#!/usr/bin/env python

import ConfigParser
import sink
import os

def stupidConfig(config):
    a={}
    for atts in config: a.update({atts[0]:atts[1]})
    return a
def getSinks(file):
    s=[]
    config = ConfigParser.ConfigParser()
    config.read([file])
    for section in config.sections():
        module = __import__('sinks.%s'%section.lower(),globals(),locals(),section.lower())
        s.append(getattr(module, 'sink')(stupidConfig(config.items(section))))
    return s
def run():
    files=[]

    print "initializing..."
    if os.path.isdir('config'):
        for file in os.listdir('config'):
            files.append(getSinks(os.path.join('config',file)))
    sink.init(files)
    print "done initializing..."

    sink.loop(files)
    
run()=======
#!/usr/bin/env python

import ConfigParser
import sink
import os

def stupidConfig(config):
    a={}
    for atts in config: a.update({atts[0]:atts[1]})
    return a
def getSinks(file):
    s=[]
    config = ConfigParser.ConfigParser()
    config.read([file])
    for section in config.sections():
        module = __import__('sinks.%s'%section.lower(), globals(), locals(), section.lower())
        s.append(getattr(module, 'sink')(stupidConfig(config.items(section))))
    return s
def run(directory):
    files=[]
    print "initializing..."
    for file in os.listdir(directory):
        files.append(getSinks(os.path.join(directory,file)))
    
    sink.init(files)

    print "done initializing..."
    sink.loop(files)

if os.path.isdir('config'): run('config')>>>>>>> .r14
